﻿using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using static log4net.Appender.RollingFileAppender;

namespace U9BJWebApi.Models.RequestDTOs
{
    public class ContextPara
    {
        private DateTime _businessDate = DateTime.Now;
        public long OrgID { get; set; }
        public long UserID { get; set; }
        public DateTime BusinessDate
        {
            get
            {
                return _businessDate;
            }
            set
            {
                DateTime now = DateTime.Now;
                if (value.Date != now.Date && value != default && value != null)
                {
                    _businessDate = new DateTime(value.Year, value.Month, value.Day, now.Hour, now.Minute, now.Second);
                }
                else
                    _businessDate = now;
            }
        }
    }
}